K3 WORKBENCH — REUSE GUIDE

Python helpers: dedupe_preserving_order, chunked, format_duration and
count_words. Import the functions from python/utilities.py into your own
project. The supplied tests show inputs, outputs and validation behavior.

JavaScript: task-pool/src/task-pool.js exports mapPool(items,worker,options).
Set positive integer options.concurrency. Results retain input order; first
failure stops new work and drains tasks already started. Optional AbortSignal
is cooperative: a worker that never settles keeps the pool waiting.
Read TASK.txt and the tests for the exact finite-array contract.

OpenCode patches: two focused changes for upstream tag v2.0.23, commit
0fd7e2829449b052abf0078666669302923d77af. Credential-bearing URLs in arrays
are redacted; truncateMiddle handles empty and narrow budgets. Each patch
includes a regression test. Apply only to a matching source checkout:
  git apply --check /path/to/opencode-debug-redaction.patch
  git apply /path/to/opencode-debug-redaction.patch
Repeat for opencode-narrow-terminal.patch. Review your diff, run its focused
regression tests with the checkout's supported Bun tooling, then run the
full project checks before distributing a rebuilt OpenCode. These patches
were independently reviewed and passed focused tests; a full build was not
performed. Terminal truncation is scoped to the supplied integer/UTF-16
contract, not a complete Unicode terminal-width implementation.

Context preparation: python3 context_workload.py --output /new/local/folder
creates synthetic prompts and separate exact-answer keys, without network
or credential access. Prompt bytes are not measured model tokens. An API
runner, tokenizer and paid provider access are not included.

VERIFICATION.json preserves failures and measurement limits. Reasoning-only
stream completions are transport results, not usable generated artifacts.
The original API transcripts, endpoint configuration and local database
remain private. No provider recommendation or capacity guarantee is made.
